<?php

namespace Library\Entities;

class Connexion extends \Library\Entity {

    protected $email,
              $password;
    
    const MAIL_INVALIDE = 1;
    const MDP_INVALIDE = 2;
    
    // SETTERS //
    public function setMail($email) {
        if (!is_string($email) || empty($email))
            $this->erreurs[] = self::MAIL_INVALIDE;
        else
            $this->email = $email;
    }

    public function setMDP($password) {
            $this->password = $password;
    }
    
    // GETTERS //
    public function mail() {
        return $this->email;
    }

    public function mdp() {
        return $this->password;
    }
}

?>
